rm -rf $HOME/.npm/
rm -rf $HOME/.yarn/
rm -rf $HOME/.local/share/fnm
rm -rf $HOME/.cache/pnpm
rm -rf $HOME/.cache/node
# 安装fnm
paru -S --needed fnm --noconfirm
export FNM_NODE_DIST_MIRROR=https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/
# export FNM_NODE_DIST_MIRROR=https://mirrors.volces.com/nodejs-release/
# 设置fnm
# fnm install --latest
fnm install --lts
# --lts --latest --node-dist-mirror=https://npmmirror.com/mirrors/node
# 阿里加速
# npm config set registry https://registry.npmmirror.com
# npm config set sharp_binary_host "https://npmmirror.com/mirrors/sharp"
# npm config set sharp_libvips_binary_host "https://npmmirror.com/mirrors/sharp-libvips"

# 阿里加速
npm config set registry https://registry.npmmirror.com
# npm config set registry https://mirrors.cloud.tencent.com/npm/
# npm config set registry https://mirrors.huaweicloud.com/repository/npm/
npm install -g npm

App="yarn pnpm neovim http-server @astrojs/language-server svelte-language-server typescript prettier node-gyp @mapbox/node-pre-gyp"

for s in ${App}; do
    npm -g install $s
done
